#meta-description: 敌人采取行动时的行为逻辑
extends Action

@export var defend := 4

func performAction():
  if !enemy or !target: return
  var armor := Armor.new()
  armor.amount = defend
  armor.sound = sound
  armor.execute([enemy])

  get_tree().create_timer(0.6, false).timeout.connect(
    func(): Events.actionCompleted.emit(enemy)
  )
